]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: Rely on default button for activation
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 4 Oct 2012 17:38:37 +0000 (19:38 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 4 Oct 2012 19:18:54 +0000 (21:18 +0200)
Currently the default action is performed twice when pressing Return
in the login dialog, once in response to the entry's 'activate' signal,
and again by activating the default button. Usually this is not a
problem, as the second invocation is simply ignored, however it breaks
the case where multiple consecutive questions are asked (e.g. username
and password in the 'Not listed' case).
Fix the problem by not handling the 'activate' signal at all.

https://bugzilla.gnome.org/show_bug.cgi?id=685511

js/gdm/loginDialog.js

index 5d1b6c0626bd6a588b48be9dc95be01401337faa..404cae75bfc6684b38a3fe5d8f1fe68214d97cc5 100644 (file)
@@ -901,15 +901,6 @@ const LoginDialog = new Lang.Class({
                          label: C_("button", "Sign In"),
                          default: true }];
 
-        this._promptEntryActivateCallbackId = this._promptEntry.clutter_text.connect('activate',
-                                                                                     Lang.bind(this, function() {
-                                                                                         hold.release();
-                                                                                     }));
-        hold.connect('release', Lang.bind(this, function() {
-                         this._promptEntry.clutter_text.disconnect(this._promptEntryActivateCallbackId);
-                         this._promptEntryActivateCallbackId = null;
-                     }));
-
         let tasks = [function() {
                          return this._fadeInPrompt();
                      },
@@ -926,11 +917,6 @@ const LoginDialog = new Lang.Class({
     },
 
     _hidePrompt: function() {
-        if (this._promptEntryActivateCallbackId) {
-            this._promptEntry.clutter_text.disconnect(this._promptEntryActivateCallbackId);
-            this._promptEntryActivateCallbackId = null;
-        }
-
         this.setButtons([]);
 
         let tasks = [function() {